package com.solutec.tag9;

public class Thema2_Arrays02_Copy {

	public static void main(String[] args) {

		int[] arr1 = new int[3];
		arr1[0] = 5;

		//copy (clone):
		int[] arr2 = new int[arr1.length];
		
		for (int i =1; i<arr1.length; i++){
			arr2[i] = arr1[i]; 
		}
		
		//ausgeben:
		for(int i=0;i<arr1.length;i++){
			System.out.println(arr1[i] +" / " + arr2[i]);
		}

		arr2[2] = -7;
		
		System.out.println("------------------------------------");
		
		for(int i=0;i<arr1.length;i++){
			System.out.println(arr1[i] +" / " + arr2[i]);
		}
		
	}//ende of main

}
